<?php
class AdminWebUser extends CWebUser
{
	public function hasPermission($permissionName)
	{
		$allowedPermissions = Yii::app()->admin->getState('permissions');
		if(!empty($allowedPermissions) && in_array($permissionName, $allowedPermissions)){
			return true;	
		}
		return false;
	}
}